<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
<script>
// Promise静态方法

// Promise.reject()返回一个失败状态的promsie对象
//无论传入的参数是什么，返回的结果跟随传入的参数

// let p1 = Promise.reject(123);
// console.log( p1 );// Promise {<rejected>: 123}

let p2 = Promise.reject(new Promise((resolve,reject)=>{
    resolve(123);
    // reject(456);
}));
console.log( p2 );// Promise {<rejected>: Promise}

</script>
</body>
</html>